1 00:00:00,450 --> 00:00:14,670 Hello there welcome to these you on type of operator the time off operator is used in javascript to 2 00:00:14,700 --> 00:00:24,170 find out or determine the data type that the value contains. 3 00:00:24,180 --> 00:00:34,190 If you want to find out what a piece of data contains like the data type you can use the type of operator 4 00:00:34,230 --> 00:00:35,420 to just terminate. 5 00:00:35,550 --> 00:00:36,970 If it's a string. 6 00:00:37,090 --> 00:00:47,430 If is no number if it's a bullion an object or if it's an on defined value you can use the type of operator 7 00:00:47,760 --> 00:00:57,650 to ascertain that I have already routine some code here to show you how. 8 00:00:57,650 --> 00:01:01,140 B types of operator works. 9 00:01:01,290 --> 00:01:11,160 So this is just some sample javascript code inside the notepad plus plus editor so my code is between 10 00:01:11,160 --> 00:01:12,930 the script tag. 11 00:01:13,080 --> 00:01:22,350 So if I run this should or alerts what the data types should be. 12 00:01:22,350 --> 00:01:35,350 Please take note that in Javascript any data type or any value or data can be classified as an object. 13 00:01:35,460 --> 00:01:39,900 So some of these values may return as an object. 14 00:01:39,900 --> 00:01:48,220 For example dennard value the name value might come up as an IV. 15 00:01:48,270 --> 00:01:49,620 Even the a3. 16 00:01:49,760 --> 00:01:57,010 This one here might come up as an object because Job us create treats them that way. 17 00:01:57,210 --> 00:02:05,270 So let me run this code and you can see what it does in the browser right to begin. 18 00:02:05,280 --> 00:02:09,820 You got a ranh are launching Firefox. 19 00:02:10,020 --> 00:02:13,110 Ah so no is the first one here. 20 00:02:13,110 --> 00:02:20,830 Dont forget in Javascript the code is executed from top to bottom. 21 00:02:20,880 --> 00:02:28,770 Just like you would read a book or pulley from top to bottom so it goes from top to bottom left to right. 22 00:02:28,770 --> 00:02:37,980 Right so you execute the first one is done that which is a number is saying that the type of 47 so identify 23 00:02:37,980 --> 00:02:40,700 that as in number. 24 00:02:40,760 --> 00:02:41,310 K.. 25 00:02:41,440 --> 00:02:45,210 Go on to the next one string. 26 00:02:45,350 --> 00:02:52,340 Identify that this text here you are Sam is a string. 27 00:02:53,070 --> 00:02:57,450 So if I click K It will jump on to the next one. 28 00:02:57,450 --> 00:03:02,300 We should alert a boolean because the value here is seen. 29 00:03:02,590 --> 00:03:04,330 True. 30 00:03:04,820 --> 00:03:10,190 And then I got to the next montanas should be brilliant as well because K. 31 00:03:11,010 --> 00:03:17,970 Okay if I click on this one is should show if I click click it will jump onto this piece of code and 32 00:03:18,150 --> 00:03:22,780 revealed that it's an undefined gone to the next one. 33 00:03:22,790 --> 00:03:30,450 It should show as an object and then I click okay or jump onto the next one. 34 00:03:30,450 --> 00:03:34,900 We should be an object as well like legal k.. 35 00:03:34,920 --> 00:03:43,380 This one is an i report it treats it as an object and then this one also treats a lot of value as an 36 00:03:43,380 --> 00:03:44,440 object. 37 00:03:44,880 --> 00:03:58,040 Okay so this is an example of how you would use the type of operator to identify the data type. 38 00:03:58,080 --> 00:04:00,900 Just a quick summary in this vigil. 39 00:04:00,930 --> 00:04:12,120 I explain what the type of operator does it's use to determine or find out the data type offer value 40 00:04:12,210 --> 00:04:14,410 or piece of data. 41 00:04:14,640 --> 00:04:24,240 It uses the key word off I saw showed you some examples used in the type of operator. 42 00:04:25,180 --> 00:04:26,770 Again I need you. 43 00:04:26,890 --> 00:04:29,520 Has made sense if it hasn't. 44 00:04:29,530 --> 00:04:32,280 Please feel free to contact me. 45 00:04:32,440 --> 00:04:35,580 I'll be more than happy to explain. 46 00:04:35,890 --> 00:04:37,350 Thank you for watching me. 47 00:04:37,390 --> 00:04:40,860 I really do value and appreciate your time. 48 00:04:41,080 --> 00:04:41,980 Thank you. 49 00:04:41,980 --> 00:04:43,110 Bye for now.